home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_root._currentframe == 31)
- {
- this._visible = false;
- }
- if(_root.gameReallyOver == 1)
- {
- _X = -10000;
- _Y = 10000;
- _visible = false;
- }
- if(_root.lives >= 1)
- {
- if(_root.gameOn == 1)
- {
- if(isNegative == 0 && _root.negativeColor == 1)
- {
- myColor.negative();
- isNegative = 1;
- }
- if(isNegative == 1 && _root.negativeColor == 0)
- {
- myColor.setTransform(orig);
- isNegative = 0;
- }
- if(_root.speed > 0)
- {
- _root.speed -= 0.4;
- }
- if(_root.speed < 0)
- {
- _root.speed = 0;
- }
- if(_root.dir == 1 && this._y > 20)
- {
- _Y = _Y - _root.speed;
- }
- if(_root.dir == 2 && this._y > 20 && this._x < 630)
- {
- _Y = _Y - _root.speed;
- _X = _X + _root.speed;
- }
- if(_root.dir == 3 && this._x < 630)
- {
- _X = _X + _root.speed;
- }
- if(_root.dir == 4 && this._y < 380 && this._x < 630)
- {
- _Y = _Y + _root.speed;
- _X = _X + _root.speed;
- }
- if(_root.dir == 5 && this._y < 380)
- {
- _Y = _Y + _root.speed;
- }
- if(_root.dir == 6 && this._x > 20 && this._y < 380)
- {
- _Y = _Y + _root.speed;
- _X = _X - _root.speed;
- }
- if(_root.dir == 7 && this._x > 20)
- {
- _X = _X - _root.speed;
- }
- if(_root.dir == 8 && this._x > 20 && this._y > 20)
- {
- _Y = _Y - _root.speed;
- _X = _X - _root.speed;
- }
- if(Key.isDown(38))
- {
- if(_root.dir == 4 || _root.dir == 5 || _root.dir == 6)
- {
- _root.speed = 0;
- }
- _root.dir = 1;
- if(_root.speed < _root.speedMax)
- {
- _root.speed = _root.speed + 1;
- }
- }
- if(Key.isDown(39))
- {
- if(_root.dir == 6 || _root.dir == 7 || _root.dir == 8)
- {
- _root.speed = 0;
- }
- _root.dir = 3;
- if(_root.speed < _root.speedMax)
- {
- _root.speed = _root.speed + 1;
- }
- }
- if(Key.isDown(40) && _Y < 387)
- {
- if(_root.dir == 1 || _root.dir == 2 || _root.dir == 8)
- {
- _root.speed = 0;
- }
- _root.dir = 5;
- if(_root.speed < _root.speedMax)
- {
- _root.speed = _root.speed + 1;
- }
- }
- if(Key.isDown(37) && _X > 13)
- {
- if(_root.dir == 2 || _root.dir == 3 || _root.dir == 4)
- {
- _root.speed = 0;
- }
- _root.dir = 7;
- if(_root.speed < _root.speedMax)
- {
- _root.speed = _root.speed + 1;
- }
- }
- if(Key.isDown(38) && Key.isDown(39))
- {
- _root.dir = 2;
- if(_root.speed < _root.speedMax)
- {
- _root.speed = _root.speed + 1;
- }
- }
- if(Key.isDown(38) && Key.isDown(37))
- {
- _root.dir = 8;
- if(_root.speed < _root.speedMax)
- {
- _root.speed = _root.speed + 1;
- }
- }
- if(Key.isDown(40) && Key.isDown(37))
- {
- _root.dir = 6;
- if(_root.speed < _root.speedMax)
- {
- _root.speed = _root.speed + 1;
- }
- }
- if(Key.isDown(39) && Key.isDown(40))
- {
- _root.dir = 4;
- if(_root.speed < _root.speedMax)
- {
- _root.speed = _root.speed + 1;
- }
- }
- }
- }
- if(_root.lives == 0)
- {
- if(deathCount < 100)
- {
- deathCount += 5;
- _width++;
- _height++;
- _alpha = _alpha - 5;
- }
- if(deathCount == 100)
- {
- _alpha = 0;
- }
- }
- }
-